from django.http import HttpResponse,HttpResponseRedirect
from app.luca_admin.models import Setting
from common.util.fiboapi import *

def fiboajax(request):
    username = Setting.objects.get(name="user").setting
    password = Setting.objects.get(name="password").setting
    type = request.GET['type']
    
    if type == "status":
        result=smsCheckClient()
    elif type =="bank":
        result=smsGetClientBalance()
    elif type == "service":
        result=smsGetListSMSHostingWithBalance()
    elif type == "brandname":
        result=smsGetClientSenderNameList()
        
    return HttpResponse(result)
